The field of physically based animation in computer graphics involves simulation of physical phenomenon such as the dynamics of rigid bodies, clothing, deformable objects or fluid flow.
One conventional approach has been to simulate dynamic objects by computing forces acting on an object over time steps. At the beginning of each time step, internal and external forces are accumulated. Examples of internal forces are elastic forces in deformable objects or viscosity and pressure forces in fluids. Gravity and collision are examples of external forces. It is well known that Newton's second law of motion relates forces to accelerations via the mass. Using the density or lumped masses of vertices, the forces can then be transformed into acceleration values. Subsequently, any time integration scheme can be used to first compute the velocities from the accelerations and then the positions from the velocities. Some approaches alternatively use impulses instead of forces to control the animation.
Another conventional approach to simulating dynamic objects involves using position based dynamics. A position based approach eliminates the velocity layer and immediately works on the positions. In computer graphics and especially in computer games, it is often desirable to have direct control over positions of objects or vertices of a mesh. The user may want to attach a vertex to a kinematic object or ensure the vertex always stay outside a colliding object. In such cases, it is beneficial to have an approach that works directly on the positions of objects, which makes such manipulations more efficient. In addition, with the position based approach it is possible to control the integration directly, thereby, avoiding overshooting and energy gain problems in connection with explicit integration.
Software-based constraint solvers are typically used in simulation systems, (position-based or otherwise) to ensure that the dynamic objects being simulated satisfy a series of predefined physical constraints. Visual effects are typically built using a combination of different physics solvers, e.g., a solver for rigid bodies, a solver for fluids, a solver for clothing etc. One shortcoming of implementing conventional solvers, e.g., solvers for rigid bodies is that stable stacking of rigid bodies can be computationally intensive for real-time applications. This is in large part due to the large number of iterations required to propagate collision forces from the bottom of a stack to bodies at the top. As a result, stacks of simulated rigid bodies are either unstable or the computation time required for the solver to stabilize the stacks results in serious inefficiencies.